package cn.edu.fzu.homemaking.wallet.domain.enums;

public enum CompanyUserTypeEnum {

    ADMIN(0, "公司管理员"),

    STAFF(1, "员工"),

    CALL(2,"客服");

    private final int    value;

    private final String desc;

    CompanyUserTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static CompanyUserTypeEnum parse(int value) {
        switch (value) {
            case 0:
                return ADMIN;
            case 1:
                return STAFF;
            case 2:
                return CALL;
            default:
                return null;
        }
    }
}
